# Author:	gong_libin
# Date:		2016_06_01

CC ?= g++
CFLAGS ?= -Wall -fPIC

GLB_ENV ?= $(shell pwd)/../..
GLB_INC ?= $(GLB_ENV)/inc
GLB_SRC ?= $(GLB_ENV)/src
GLB_OBJ ?= $(GLB_SRC)/GlbObj

OBJECTS =				\
	GlbDll.o			\
	GlbLog.o			\
	GlbMd5.o			\
	GlbSet.o			\
	GlbList.o			\
	GlbSema.o			\
	GlbAcbm.o			\
	GlbConf.o			\
	GlbFile.o			\
	GlbPipe.o			\
	GlbTime.o			\
	GlbPool.o			\
	GlbBloom.o			\
	GlbQueue.o			\
	GlbCdLock.o			\
	GlbMtLock.o			\
	GlbRwLock.o			\
	GlbThread.o			\
	GlbMember.o			\
	GlbWorker.o

all: $(OBJECTS) install

$(OBJECTS): %.o: %.cpp
	$(CC) -c $(CFLAGS) -I$(GLB_INC) $< -o $@

install:
	cp $(OBJECTS) $(GLB_OBJ)/.

clean:
	rm -rf $(OBJECTS)
